package com.ys.day29.Reflect.p6Reflect与Constructor对象;

import java.util.Objects;

/**
 * 描述: 测试的学生对象
 *
 * @author CodeYang
 * @version 2021/1/11 21:20
 */
public class Student {


    private  static  int des;
    private int stuId;
    private String name;
    private String sex;

    public Student() {

    }

    public Student(int stuId, String name, String sex) {
        this.stuId = stuId;
        this.name = name;
        this.sex = sex;
    }

    public int getStuId() {
        return stuId;
    }

    public void setStuId(int stuId) {
        this.stuId = stuId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return stuId == student.stuId &&
                Objects.equals(name, student.name) &&
                Objects.equals(sex, student.sex);
    }

    @Override
    public int hashCode() {
        return Objects.hash(stuId, name, sex);
    }

    @Override
    public String toString() {
        return "Student{" +
                "stuId=" + stuId +
                ", name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                '}';
    }
}
